<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 点内部的 它先捕获外部的 再捕获内部的 然后再冒泡内部的  再冒泡外部的 -->
    <div id="box1">
        <div id="box3">

        </div>
    </div>
</body>
<script>
    let box1 = document.querySelector('#box1')
    let box3 = document.querySelector('#box3')

    box1.addEventListener('click', function () {
        console.log('box1捕获');
    })

    box3.addEventListener('clcik', function () {
        console.log('box2捕获');
    })
</script>

<style>
    #box1 {
        width: 200px;
        height: 200px;
        background-color: aqua;
    }

    #box3 {
        width: 100px;
        height: 100px;
        background-color: aquamarine;
    }
</style>
</html>